a = {}
def cache_deco(func):
    global a
    def wrapper(n):
        if n not in a:
            a[n] = func(n)
        return a[n]
    return wrapper

@ cache_deco
def fibo(n):
    if n < 2:
        return n
    else:
        return fibo(n - 2) + fibo(n - 1)

print(fibo(10))
print(a)